﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace Example_SeoulOpenAPI.ViewModels
{
    public class PassingStation : INotifyPropertyChanged
    {
        private string _destination;
        private string _arriveTime;
        private string _dayCode;
        private string _directionCode;
        private string _frCode;
        private string _stationCode;
        private string _stationName;

        #region Properties

        public string Destination
        {
            get { return _destination; }
            set
            {
                if (value != _destination)
                {
                    _destination = value;
                    NotifyPropertyChanged("Destination");
                }
            }
        }

        public string ArriveTime
        {
            get { return _arriveTime; }
            set
            {
                if (value != _arriveTime)
                {
                    _arriveTime = value;
                    NotifyPropertyChanged("ArriveTime");
                }
            }
        }

        public string DayCode
        {
            get { return _dayCode; }
            set
            {
                if (value != _dayCode)
                {
                    _dayCode = value;
                    NotifyPropertyChanged("DayCode");
                }
            }
        }

        public string DirectionCode
        {
            get { return _directionCode; }
            set
            {
                if (value != _directionCode)
                {
                    _directionCode = value;
                    NotifyPropertyChanged("DirectionCode");
                }
            }
        }

        public string FrCode
        {
            get { return _frCode; }
            set
            {
                if (value != _frCode)
                {
                    _frCode = value;
                    NotifyPropertyChanged("FrCode");
                }
            }
        }

        public string StationCode
        {
            get { return _stationCode; }
            set
            {
                if (value != _stationCode)
                {
                    _stationCode = value;
                    NotifyPropertyChanged("StationCode");
                }
            }
        }

        public string StationName
        {
            get { return _stationName; }
            set
            {
                if (value != _stationName)
                {
                    _stationName = value;
                    NotifyPropertyChanged("StationName");
                }
            }
        }

        #endregion


        #region Property Event

        public event PropertyChangedEventHandler PropertyChanged;
        protected void NotifyPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        #endregion

    }
}
